import request from '@/utils/request'

// 设备
// 获取售货机列表
export const loginList = function(params) {
  return request({
    url: '/vm-service/vm/search',
    method: 'GET',
    params
  })
}

// 获取点位列表
export const dianWeiList = function(params) {
  return request({
    url: '/vm-service/vm/search',
    method: 'GET',
    params
  })
}
// 获取售货机列表
export const shouHuojiList = function(params) {
  return request({
    url: '/vm-service/vmType/search',
    method: 'GET',
    params
  })
}

// 新增售货机类型
export const addDataList = function(data) {
  return request({
    url: '/vm-service/vmType',
    method: 'POST',
    data
  })
}
// 获取策略列表
export const getStrategy = function(params) {
  return request({
    url: '/vm-service/policy',
    method: 'GET',
    params
  })
}
// 应用策略列表
export const addStrategy = function(params) {
  return request({
    url: '/vm-service/vm/applyPolicy',
    method: 'PUT',
    params
  })
}
// 类型
// 获取售货机类型列表(搜索)
export const getHousLisst = function(params) {
  return request({
    url: '/vm-service/vmType/search',
    method: 'GET',
    params
  })
}

// 售货机类型删除
export const delshouhuoji = function(data) {
  return request({
    url: '/vm-service/vmType/667',
    method: 'DELETE',
    data
  })
}

// 售货机类型详情
export const setshouhuoji = function(params) {
  return request({
    url: `/vm-service/vmType/1`,
    method: 'GET',
    params
  })
}

// 售货机类型修改
export const upDatashouhuoji = function(data) {
  return request({
    url: '/vm-service/vmType/683',
    method: 'PUT',
    data
  })
}

// 新增售货机
export const addshouhuoji = function(data) {
  return request({
    url: `/vm-service/vmType`,
    method: 'POST',
    data
  })
}
